#include<stdio.h>
int main()
{
	char a[205]={"tocyjkdzcieoiodfpbgcncsrjbhmugdnojjddhllnofawllbhfiadgdcdjstemphmnjihecoapdjjrprrqnhgccevdarufmliqijgihhfgdcmxvicfauachlifhafpdccfseflcdgjncadfclvfmadvrnaaahahndsikzssoywakgnfjjaihtniptwoulxbaeqkqhfwl"};
	long long dp[200],sum=0;
	for(int i=0;i<200;i++){
		dp[i]=1;
		for(int j=0;j<200;j++){
			if(a[i]>a[j])
				dp[i]+=dp[j];
			if(a[i]==a[j])
				dp[i]-=dp[j];
		}
	}
	for(int i=0;i<200;i++)
		sum+=dp[i];
	printf("%lld",sum);
	return 0;
}
